package com.ywk.pattern._16_state;

public class ForenoonState extends State {
    @Override
    public void WriteProgram(Work work) {
        if (work.getHour() < 12) {
            System.out.println("上午工作，精神百倍" + work.getHour());
        } else {
            work.setCurrent(new Noonstate());
            work.WritePorgram();
        }
    }

}
